﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:h="http://wubiyu.cnblogs.com">
<head>
      <title></title>
      <link href="../../Theme/DomExtGray/gray.min.css" rel="Stylesheet" type="text/css" />
      <link href="PageModel.css" rel="Stylesheet" type="text/css" />
      <script type="text/javascript" src="../../domExt.min.js"></script>
</head>
<body>
      <div class="fun_title">
            _h.ready(fn([h],[g]){});
      </div>
      <div class="fun_content">
            描述：当DOM加载完成后执行,如果页面中有多个ready将按顺序执行。<br />
       </div>
      <div class="fun_title2">
            参数:
      </div>
      <div class="fun_content2">
           fn：javascript 函数对象<br />
           &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
            h：hdomext框架对象<br />
            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
            g：选择器对象<br />
      </div>
      <div class="fun_title2">
            示例:
      </div>
      <div class="code">
            &lt;div id=&quot;div1&quot;&gt;&lt;div class=&#39;testclass&#39;&gt;testdiv&lt;/div&gt;&lt;/div&gt;
      </div>
      <input type="hidden" value="<div id='div1'><div class='testclass'>testdiv</div></div>"
            id="htmlcode">
      <div class="code">
            &lt;script type=&quot;text/javascript&quot;&gt;<br />
&nbsp;&nbsp;&nbsp; _h.ready(function(h,g){<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; alert(g(&#39;#div1&#39;).id));<br />
&nbsp;&nbsp;&nbsp; })；<br />
            &lt;/script&gt;</div>
</body>
</html>
